Integrand size = 23, antiderivative size = 102 \[ \int \frac {\csc (a+b x) \sin (3 a+3 b x)}{(c+d x)^2} \, dx=-\frac {3 \cos ^2(a+b x)}{d (c+d x)}-\frac {4 b \operatorname {CosIntegral}\left (\frac {2 b c}{d}+2 b x\right ) \sin \left (2 a-\frac {2 b c}{d}\right )}{d^2}+\frac {\sin ^2(a+b x)}{d (c+d x)}-\frac {4 b \cos \left (2 a-\frac {2 b c}{d}\right ) \text {Si}\left (\frac {2 b c}{d}+2 b x\right )}{d^2} \]
[Out]
Time = 0.33 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {4516, 3394, 12, 3384, 3380, 3383} \[ \int \frac {\csc (a+b x) \sin (3 a+3 b x)}{(c+d x)^2} \, dx=-\frac {4 b \sin \left (2 a-\frac {2 b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {2 b c}{d}+2 b x\right )}{d^2}-\frac {4 b \cos \left (2 a-\frac {2 b c}{d}\right ) \text {Si}\left (\frac {2 b c}{d}+2 b x\right )}{d^2}+\frac {\sin ^2(a+b x)}{d (c+d x)}-\frac {3 \cos ^2(a+b x)}{d (c+d x)} \]
[In]
[Out]
Rule 12
Rule 3380
Rule 3383
Rule 3384
Rule 3394
Rule 4516
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {3 \cos ^2(a+b x)}{(c+d x)^2}-\frac {\sin ^2(a+b x)}{(c+d x)^2}\right ) \, dx \\ & = 3 \int \frac {\cos ^2(a+b x)}{(c+d x)^2} \, dx-\int \frac {\sin ^2(a+b x)}{(c+d x)^2} \, dx \\ & = -\frac {3 \cos ^2(a+b x)}{d (c+d x)}+\frac {\sin ^2(a+b x)}{d (c+d x)}-\frac {(2 b) \int \frac {\sin (2 a+2 b x)}{2 (c+d x)} \, dx}{d}+\frac {(6 b) \int -\frac {\sin (2 a+2 b x)}{2 (c+d x)} \, dx}{d} \\ & = -\frac {3 \cos ^2(a+b x)}{d (c+d x)}+\frac {\sin ^2(a+b x)}{d (c+d x)}-\frac {b \int \frac {\sin (2 a+2 b x)}{c+d x} \, dx}{d}-\frac {(3 b) \int \frac {\sin (2 a+2 b x)}{c+d x} \, dx}{d} \\ & = -\frac {3 \cos ^2(a+b x)}{d (c+d x)}+\frac {\sin ^2(a+b x)}{d (c+d x)}-\frac {\left (b \cos \left (2 a-\frac {2 b c}{d}\right )\right ) \int \frac {\sin \left (\frac {2 b c}{d}+2 b x\right )}{c+d x} \, dx}{d}-\frac {\left (3 b \cos \left (2 a-\frac {2 b c}{d}\right )\right ) \int \frac {\sin \left (\frac {2 b c}{d}+2 b x\right )}{c+d x} \, dx}{d}-\frac {\left (b \sin \left (2 a-\frac {2 b c}{d}\right )\right ) \int \frac {\cos \left (\frac {2 b c}{d}+2 b x\right )}{c+d x} \, dx}{d}-\frac {\left (3 b \sin \left (2 a-\frac {2 b c}{d}\right )\right ) \int \frac {\cos \left (\frac {2 b c}{d}+2 b x\right )}{c+d x} \, dx}{d} \\ & = -\frac {3 \cos ^2(a+b x)}{d (c+d x)}-\frac {4 b \operatorname {CosIntegral}\left (\frac {2 b c}{d}+2 b x\right ) \sin \left (2 a-\frac {2 b c}{d}\right )}{d^2}+\frac {\sin ^2(a+b x)}{d (c+d x)}-\frac {4 b \cos \left (2 a-\frac {2 b c}{d}\right ) \text {Si}\left (\frac {2 b c}{d}+2 b x\right )}{d^2} \\ \end{align*}
Time = 0.41 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.79 \[ \int \frac {\csc (a+b x) \sin (3 a+3 b x)}{(c+d x)^2} \, dx=-\frac {\frac {d (1+2 \cos (2 (a+b x)))}{c+d x}+4 b \operatorname {CosIntegral}\left (\frac {2 b (c+d x)}{d}\right ) \sin \left (2 a-\frac {2 b c}{d}\right )+4 b \cos \left (2 a-\frac {2 b c}{d}\right ) \text {Si}\left (\frac {2 b (c+d x)}{d}\right )}{d^2} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.97 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.52
method | result | size |
risch | \(-\frac {1}{d \left (d x +c \right )}+\frac {2 i b \,{\mathrm e}^{-\frac {2 i \left (a d -c b \right )}{d}} \operatorname {Ei}_{1}\left (2 i b x +2 i a -\frac {2 i \left (a d -c b \right )}{d}\right )}{d^{2}}-\frac {2 i b \,{\mathrm e}^{\frac {2 i \left (a d -c b \right )}{d}} \operatorname {Ei}_{1}\left (-2 i b x -2 i a -\frac {2 \left (-i a d +i c b \right )}{d}\right )}{d^{2}}-\frac {\left (-2 d x b -2 c b \right ) \cos \left (2 x b +2 a \right )}{d \left (-d x b -c b \right ) \left (d x +c \right )}\) | \(155\) |
default | \(\frac {1}{d \left (d x +c \right )}+\frac {b^{2} \left (-\frac {2 \cos \left (2 x b +2 a \right )}{\left (-a d +c b +d \left (x b +a \right )\right ) d}-\frac {2 \left (\frac {2 \,\operatorname {Si}\left (2 x b +2 a +\frac {-2 a d +2 c b}{d}\right ) \cos \left (\frac {-2 a d +2 c b}{d}\right )}{d}-\frac {2 \,\operatorname {Ci}\left (2 x b +2 a +\frac {-2 a d +2 c b}{d}\right ) \sin \left (\frac {-2 a d +2 c b}{d}\right )}{d}\right )}{d}\right )-\frac {2 b^{2}}{\left (-a d +c b +d \left (x b +a \right )\right ) d}}{b}\) | \(169\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.04 \[ \int \frac {\csc (a+b x) \sin (3 a+3 b x)}{(c+d x)^2} \, dx=-\frac {4 \, d \cos \left (b x + a\right )^{2} + 4 \, {\left (b d x + b c\right )} \operatorname {Ci}\left (\frac {2 \, {\left (b d x + b c\right )}}{d}\right ) \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) + 4 \, {\left (b d x + b c\right )} \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (b d x + b c\right )}}{d}\right ) - d}{d^{3} x + c d^{2}} \]
[In]
[Out]
\[ \int \frac {\csc (a+b x) \sin (3 a+3 b x)}{(c+d x)^2} \, dx=\int \frac {\sin {\left (3 a + 3 b x \right )} \csc {\left (a + b x \right )}}{\left (c + d x\right )^{2}}\, dx \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.33 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.18 \[ \int \frac {\csc (a+b x) \sin (3 a+3 b x)}{(c+d x)^2} \, dx=-\frac {{\left (E_{2}\left (\frac {2 \, {\left (-i \, b d x - i \, b c\right )}}{d}\right ) + E_{2}\left (-\frac {2 \, {\left (-i \, b d x - i \, b c\right )}}{d}\right )\right )} \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) - {\left (-i \, E_{2}\left (\frac {2 \, {\left (-i \, b d x - i \, b c\right )}}{d}\right ) + i \, E_{2}\left (-\frac {2 \, {\left (-i \, b d x - i \, b c\right )}}{d}\right )\right )} \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) + 1}{d^{2} x + c d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 308 vs. \(2 (102) = 204\).
Time = 0.31 (sec) , antiderivative size = 308, normalized size of antiderivative = 3.02 \[ \int \frac {\csc (a+b x) \sin (3 a+3 b x)}{(c+d x)^2} \, dx=-\frac {4 \, b^{3} c \operatorname {Ci}\left (\frac {2 \, {\left (b c + {\left (b x + a\right )} d - a d\right )}}{d}\right ) \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) + 4 \, {\left (b x + a\right )} b^{2} d \operatorname {Ci}\left (\frac {2 \, {\left (b c + {\left (b x + a\right )} d - a d\right )}}{d}\right ) \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) - 4 \, a b^{2} d \operatorname {Ci}\left (\frac {2 \, {\left (b c + {\left (b x + a\right )} d - a d\right )}}{d}\right ) \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) - 4 \, b^{3} c \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {Si}\left (-\frac {2 \, {\left (b c + {\left (b x + a\right )} d - a d\right )}}{d}\right ) - 4 \, {\left (b x + a\right )} b^{2} d \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {Si}\left (-\frac {2 \, {\left (b c + {\left (b x + a\right )} d - a d\right )}}{d}\right ) + 4 \, a b^{2} d \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {Si}\left (-\frac {2 \, {\left (b c + {\left (b x + a\right )} d - a d\right )}}{d}\right ) + 2 \, b^{2} d \cos \left (2 \, b x + 2 \, a\right ) + b^{2} d}{{\left (b c d^{2} + {\left (b x + a\right )} d^{3} - a d^{3}\right )} b} \]
[In]
[Out]
Timed out. \[ \int \frac {\csc (a+b x) \sin (3 a+3 b x)}{(c+d x)^2} \, dx=\int \frac {\sin \left (3\,a+3\,b\,x\right )}{\sin \left (a+b\,x\right )\,{\left (c+d\,x\right )}^2} \,d x \]
[In]
[Out]